package com.truyen.persistence.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the chapter_tmp_truyen_ma database table.
 * 
 */
@Entity
@Table(name="chapter_tmp_truyen_ma")
public class ChapterTmpTruyenMa implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(unique=true, nullable=false)
	private long id;

	@Column(nullable=false, length=255)
	private String alias;

	private float chapterNumber;

	@Column(nullable=false, length=255)
	private String name;

	//bi-directional one-to-one association to ChapterTruyenMa
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="id", nullable=false, insertable=false, updatable=false)
	private ChapterTruyenMa chapterTruyenMa;

	//bi-directional many-to-one association to TruyenMa
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="truyenMaItem", nullable=false)
	private TruyenMa truyenMa;

	public ChapterTmpTruyenMa() {
	}

	public ChapterTmpTruyenMa(long id2, String nameChapterTruyen,
			String nameChapterUnsigned, float chapterNumber2, TruyenMa truyen) {
		this.id=id2;
		this.name=nameChapterTruyen;
		this.alias=nameChapterUnsigned;
		this.chapterNumber=chapterNumber2;
		this.truyenMa=truyen;
	}

	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getAlias() {
		return this.alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public float getChapterNumber() {
		return this.chapterNumber;
	}

	public void setChapterNumber(float chapterNumber) {
		this.chapterNumber = chapterNumber;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ChapterTruyenMa getChapterTruyenMa() {
		return this.chapterTruyenMa;
	}

	public void setChapterTruyenMa(ChapterTruyenMa chapterTruyenMa) {
		this.chapterTruyenMa = chapterTruyenMa;
	}

	public TruyenMa getTruyenMa() {
		return this.truyenMa;
	}

	public void setTruyenMa(TruyenMa truyenMa) {
		this.truyenMa = truyenMa;
	}

}